<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMallOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mall_order', function (Blueprint $table) {
            $table->increments('id')->comment('订单表');
            $table->string('trade_id', 20)->comment('交易号');
            $table->integer('user_id')->unsigned()->comment('用户id');
            $table->smallInteger('status')->unsigned()->comment('订单支付状态');
            $table->string('realname', 20)->nullable()->comment('真实姓名');
            $table->string('phone', 25)->nullable()->comment('手机');
            $table->string('address', 100)->nullable()->comment('地址');
            $table->string('remark')->nullable()->comment('备注');
            $table->smallInteger('express_status')->unsigned()->comment('发货状态0未1已');
            $table->integer('express_type')->unsigned()->nullable()->comment('快递类型');
            $table->integer('express_code')->unsigned()->nullable()->comment('快递单号');
            $table->string('ukey', 191)->unique()->comment('唯一编码');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
